package com.zhangjm.service;

import com.zhangjm.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Value("${server.port}")
    private String port;

    /**
     * 通过用户Id，查询用户
     * @param id
     * @return
     */
    public User getById(Integer id){

        User user = new User();
        user.setId(id);
        user.setUsername("username"+port);
        return user;
    }
}
